{% set title = 'Isolate Server' %}
{% extends "isolate/base.html" %}

{% block headers %}
<style>
  .admin a {
    {% if not is_admin %}
      color: gray;
      text-decoration: line-through;
    {% endif %}
  }
  .user a {
    {% if not is_user %}
      color: gray;
      text-decoration: line-through;
    {% endif %}
  }
</style>
{% endblock %}

{% block body %}

<h1>Welcome to an Isolate Server instance</h1>
Isolate Server is a Content-Addressed Cache that is used by the Swarming
project to distribute test execution accross a swarm of slaves.
<p>

{% if not nickname %}
Please <a href="{{signin_link|safe}}">sign in</a> for more access.
{% else %}
As a {{user_type}}, you are entitled to see these pages:
{% endif %}

<h3>Service Status</h3>
<ul>
  <li><a href="/stats">Usage statistics</a></li>
  <li class="user"><a href="/browse">Browse online</a></li>
  <li class="admin"><a href="/restricted/ereporter2/errors">Recent ereporter2 errors</a></li>
  <li class="admin"><a href="/restricted/ereporter2/report">Recent exceptions in server log</a></li>
</ul>

<h3>Configuration</h3>
<ul class="admin">
  <li><a href="/restricted/config">Server global config</a></li>
  <li><a href="/auth/groups">Manage user groups</a></li>
</ul>

<h3>Map reduce jobs</h3>
<ul class="admin">
  <li><a href="/restricted/mapreduce/status">Map reduce jobs status</a></li>
  {% for job in mapreduce_jobs %}
    <li>
      <form action="/restricted/launch_mapreduce" method="post">
        <input type="hidden" name="xsrf_token" value="{{xsrf_token}}" />
        <input type="hidden" name="job_id" value="{{job.id}}" />
        <button type="submit">Launch '{{job.name}}'</button>
      </form>
    </li>
  {% endfor %}
</ul>

{% endblock %}
